package org.scs.carleton.ca.pgdt.core.parser.internal.factory;

import java.util.List;

import org.scs.carleton.ca.pgdt.core.internal.parser.ASTClause;
import org.scs.carleton.ca.pgdt.core.internal.parser.ASTFunctor;
import org.scs.carleton.ca.pgdt.core.internal.parser.ASTFunctorClause;
import org.scs.carleton.ca.pgdt.core.internal.parser.ASTStructure;
import org.scs.carleton.ca.pgdt.core.internal.parser.ASTStructureClause;
import org.scs.carleton.ca.pgdt.core.internal.parser.ASTTranslationUnit;
import org.scs.carleton.ca.pgdt.core.parser.nodes.IASTNode;
import org.scs.carleton.ca.pgdt.core.parser.nodes.IASTNodeTypes;

/**
 * The ClauseFactory is used to create clause nodes
 * 
 * @author tessierj
 *
 */
public class ClauseFactory {
	private ClauseFactory() {
		
	}
	
	public static ASTClause createClause(ASTTranslationUnit translationUnit, ASTStructure mainStructure, List<IASTNode> body) {
		return new ASTStructureClause(translationUnit, IASTNodeTypes.CLAUSE_STRUCTURE, mainStructure, body);
	}

	public static ASTClause createFunctorClause(ASTTranslationUnit translationUnit, ASTFunctor mainFunctor, List<IASTNode> subNodes) {
		return new ASTFunctorClause(translationUnit, IASTNodeTypes.CLAUSE_FUNCTOR, mainFunctor, subNodes);
	}
}
